from django.db import models
from django.contrib.auth.models import User

class Colaborador(models.Model):
    class Meta:
        verbose_name_plural = "Colaboradores"
    ativo = models.BooleanField(default=True)
    user = models.ForeignKey(User, unique=True)
    nome = models.CharField(max_length=50)
    email = models.CharField(max_length=50)
    telefone = models.CharField(max_length=12)
    twitter = models.URLField(max_length=50, blank=True, null=True)
    facebook = models.URLField(max_length=50, blank=True, null=True)
    googleplus = models.URLField(max_length=50, blank=True, null=True)
    dataentrada = models.DateField(auto_now_add=True)
    foto = models.ImageField(upload_to='colaborador')
    def __unicode__(self):
        return self.nome